# Contributor: Łukasz Jendrysik <scadu@yandex.com>
# Contributor: Carlo Landmeter <clandmeter@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=beets
pkgver=1.6.0
pkgrel=6
pkgdesc="Music library manager and MusicBrainz tagger"
options="!check" # Requires unpackaged dependencies
url="https://beets.io"
arch="noarch"
license="MIT"
subpackages="$pkgname-doc $pkgname-zsh-completion $pkgname-pyc"
depends="
	py3-confuse
	py3-jellyfish
	py3-mediafile
	py3-munkres
	py3-musicbrainzngs
	py3-mutagen
	py3-requests
	py3-unidecode
	py3-yaml
	python3
	"
makedepends="py3-setuptools"
source="https://github.com/sampsyo/beets/releases/download/v$pkgver/beets-$pkgver.tar.gz"

build() {
	python3 setup.py build
}

package() {
	python3 setup.py install --skip-build --root="$pkgdir"

	local man
	for man in man/*.?; do
		install -Dm644 "$man" \
			"$pkgdir"/usr/share/man/man${man##*.}/${man##*/}
	done

	install -Dm644 extra/_beet -t "$pkgdir"/usr/share/zsh/site-functions/
}

sha512sums="
b03759a2be7d3318b4f43cac09ada229cea6496774ba3dcdb1458427e41f6329a627241afc0bfaa9a91afb6818ba944ef6088e38c5635a3bfe730a6a8011a0dc  beets-1.6.0.tar.gz
"
